<!-- 框架基础页，勿删 -->
<template>
  <div class="page-redirect" v-loading="true">
  </div>
</template>

<script setup lang="ts" name="Redirect">
import { nextTick } from 'vue'
import { useRouter, useRoute } from 'vue-router'

const [route, router] = [useRoute(), useRouter()]
const redirect = (route.query.redirect || '/') as string
const query = route.query.query as any

nextTick(() => {
  router.push({
    path: redirect,
    query: query ? JSON.parse(query) : undefined
  })
})
</script>

<style lang="scss" scoped>
.page-redirect {
  height: 100%;
}
</style>
